﻿@model HospitalMVC.Models.Consult

@{
    ViewBag.Title = "Create";
    
}

<h2>Crear una consulta</h2>
<script src="@Url.Content("~/Scripts/MicrosoftAjax.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/hospitalMVC.js")" type="text/javascript"></script>

@using (Html.BeginForm())  
{


    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Consulta</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Nombre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nombre)
            @Html.ValidationMessageFor(model => model.Nombre)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Apellido)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Apellido)
            @Html.ValidationMessageFor(model => model.Apellido)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Fecha)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Fecha)
            @Html.ValidationMessageFor(model => model.Fecha)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Hora)
        </div>
       <div class="editor-field">
            @Html.EditorFor(model => model.Hora) (24hs)
            @Html.ValidationMessageFor(model => model.Hora)
         
        </div>

        <div class="editor-label">
           Nombre del doctor
        </div>
        <div class="editor-field">
         <!------------ selección de doctores, con un dropdown --------- --->
            @Html.DropDownList("doctorList", "doctores")
            @Html.ValidationMessageFor(model => model.Doctor.Matricula)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Precio)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Precio)
            @Html.ValidationMessageFor(model => model.Precio)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ObraSocial)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ObraSocial)
            @Html.ValidationMessageFor(model => model.ObraSocial)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "IndexList")
</div>
